// Copyright (c) 2023 Presto Labs Pte. Ltd.
// Author: tianqiang

#pragma once

#include <string>

#include "coin2/exchange/mexc/api_order_v3/native_private_client.h"

namespace coin2::exchange::mexc::api_order_v3 {

class MexcRestAsyncAsioSubscriber : public base::order::RestSubscriber {
 public:
  using RestParams = coin2::exchange::order::MexcRestParams;
  using RestClient = MexcNativePrivateClient;

 public:
  using RestSubscriber::RestSubscriber;

  auto rest_client() { return dynamic_cast<RestClient*>(rest_client_); }
  void QueryBalance();
  void QueryOpenOrders(const std::string& native_symbol);
  void QueryAllOrders(const std::string& native_symbol);
  void QueryFillOrders(const std::string& native_symbol);
  void GenListenKey(bool is_init);
  void ExtendListenKey();
  // void QueryOrdersByIds(const std::string& exchange_order_ids, const std::string&
  // proc_order_ids);
  void SubscribeAsync() override;
  void QueryTransfer() override;

 private:
  int64_t last_query_order_by_ids_ts_{0};
};

}  // namespace coin2::exchange::mexc::api_order_v3
